<extend name="Public/base"/>
<block name="head">
    <!-- DATA TABLES -->
    <link href="__PUBLIC__/plugins/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/plugins/datatables/jquery.dataTables.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/fileinput/fileinput2.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/plugins/datatables/extensions/TableTools/css/dataTables.tableTools.min.css" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" href="__PUBLIC__/dist/css/bootstrapValidator.css"/>
</block>

<block name="body">

    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-body table-responsive">
                        <table id="user-tables" class="table table-bordered table-striped ">
                            <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>用户名</th>
                                    <th>昵称</th>
                                    <th>Email</th>
                                    <th>添加时间</th>
                                    <th>上次登录</th>
                                    <th>登录次数</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <volist name="lists" id="vo" >
                                    <tr data="{$vo['id']}">
                                        <td>{$vo['id']}</td>
                                        <td>{$vo['account']}</td>
                                        <td>{$vo['nickname']}</td>
                                        <td>{$vo['email']}</td>
                                        <td>{$vo['create_time']|date="Y-m-d",###}</td>
                                        <td>{$vo['last_login_time']|date="Y-m-d H:i:s",###}</td>
                                        <td>{$vo['login_count']}</td>
                                        <td>{$vo['status']|showStatus=$vo['id']}</td>
                                        <td>
                                            <p data-placement="top" data-toggle="tooltip" title="Edit">
                                                <a href="__URL__/edit/id/{$vo['id']}">
                                                    <button class="btn btn-primary btn-xs" data-title="Edit" ><span class="glyphicon glyphicon-pencil"></span>
                                                    </button>
                                                </a>
                                            </p>
                                        </td>
                                    </tr>
                                </volist>
                            </tbody>

                        </table>
                    </div><!-- /.box-body -->
                </div><!-- /.box -->
            </div><!-- /.col -->
        </div><!-- /.row -->

        </div>
        <include file="add" />
    </section><!-- /.content -->

</block>
<block name="script">
    <script src="__PUBLIC__/dist/js/bootstrapValidator.js" type="text/javascript"></script>
    <script src="__PUBLIC__/dist/js/language/zh_CN.js" type="text/javascript"></script>
    <script src="__PUBLIC__/plugins/datatables/jquery.dataTables.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/plugins/datatables/dataTables.bootstrap.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/dist/js/validator.js" type="text/javascript"></script>
    <script src="__PUBLIC__/dist/js/custom_email.js"></script>
    <script type="text/javascript">
        $(function () {
            iniDataTable("#user-tables",'','__URL__');
            iniAjaxFormDialog('#userAddForm','#add',true);
           // Validator('userAddForm');
            $('.email-add').bind('click',function(){
                var html = '<?php echo getAddEmailTemplate(); ?>';
                $(this).parent().prev().append(html);
           //     $('#userAddForm').data('bootstrapValidator').destroy();
           //     Validator('userAddForm','#errorss');
            });

        });

    </script>

</block>